package free.grnadav.jquerymobilegwt.client.page;

import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.event.shared.EventHandler;

public class PageShowEvent extends DomEvent<PageShowEvent.Handler>{
	public interface Handler extends EventHandler {
		void onPageShow(PageShowEvent event);
	}

	/** 
	 * Protected Contractor. 
	 * Event should only be triggered by JQM upon page creation 
	 * */
	protected PageShowEvent() {
	}
	
	/**
	   * Event type for click events. Represents the meta-data associated with this
	   * event.
	   */
	  private static final Type<Handler> TYPE = new Type<Handler>(
	      "pageshow", new PageShowEvent());

	  /**
	   * Gets the event type associated with events.
	   * 
	   * @return the handler type
	   */
	  public static Type<Handler> getType() {
	    return TYPE;
	  }

	  @Override
	  public final Type<Handler> getAssociatedType() {
	    return TYPE;
	  }

	  @Override
	  protected void dispatch(Handler handler) {
	    handler.onPageShow(this);
	  }

}
